package com.demo.studentmanager.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.demo.studentmanager.dao.LeaveAuditMapper;
import com.demo.studentmanager.dto.LeaveAddDto;
import com.demo.studentmanager.dto.LeaveAuditListDto;
import com.demo.studentmanager.entity.LeaveAudit;
import com.demo.studentmanager.service.ILeaveAuditService;
import com.demo.studentmanager.vo.LeaveAuditVo;
import org.springframework.stereotype.Service;

/**
 * @author lzx
 */
@Service
public class LeaveAuditServiceImpl extends ServiceImpl<LeaveAuditMapper, LeaveAudit> implements ILeaveAuditService {

    @Override
    public IPage<LeaveAuditVo> getLeaveStu(LeaveAuditListDto leaveAuditListDto) {
        Page<LeaveAuditVo> page = new Page<>(leaveAuditListDto.getCurrent(), leaveAuditListDto.getSize());
        return baseMapper.getLeaveStu(page, leaveAuditListDto);
    }

    @Override
    public void addLeaveStu(LeaveAddDto addDto) {
        baseMapper.addLeaveStu(addDto);
    }

//    @Override
//    public void upLeaveStu(LeaveUpDto upDto) {
//        baseMapper.upLeaveStu(upDto);
//    }

}
